package Entities;
// Generated Jun 21, 2009 1:07:04 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ContentHeader generated by hbm2java
 */
@Entity
@Table(name="content_header"
    ,catalog="pdlv2"
)
public class ContentHeader  implements java.io.Serializable {


     private Integer id;
     private ContentModule contentModule;
     private String naam;
     private Integer sortering;
     private Set<ContentDetail> contentDetails = new HashSet<ContentDetail>(0);

     /**
      *
      */
     public ContentHeader() {
    }

     /**
      *
      * @param contentModule
      * @param naam
      * @param sortering
      * @param contentDetails
      */
     public ContentHeader(ContentModule contentModule, String naam, Integer sortering, Set<ContentDetail> contentDetails) {
       this.contentModule = contentModule;
       this.naam = naam;
       this.sortering = sortering;
       this.contentDetails = contentDetails;
    }
   
    /**
     *
     * @return
     */
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
    /**
     *
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     *
     * @return
     */
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="module_id")
    public ContentModule getContentModule() {
        return this.contentModule;
    }
    
/**
 *
 * @param contentModule
 */
public void setContentModule(ContentModule contentModule) {
        this.contentModule = contentModule;
    }
    
/**
 *
 * @return
 */
@Column(name="naam", length=200)
    public String getNaam() {
        return this.naam;
    }
    
/**
 *
 * @param naam
 */
public void setNaam(String naam) {
        this.naam = naam;
    }
    
    /**
     *
     * @return
     */
    @Column(name="sortering")
    public Integer getSortering() {
        return this.sortering;
    }
    
    /**
     *
     * @param sortering
     */
    public void setSortering(Integer sortering) {
        this.sortering = sortering;
    }
    /**
     *
     * @return
     */
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="contentHeader")
    public Set<ContentDetail> getContentDetails() {
        return this.contentDetails;
    }
    
/**
 *
 * @param contentDetails
 */
public void setContentDetails(Set<ContentDetail> contentDetails) {
        this.contentDetails = contentDetails;
    }




}


